import { createSerialDates } from "./tool"
import { DataSourceTypeEnum } from "./enum"
import { DataBaseTableNameEnum } from "./enum"
import { marketDulDisclosureBackEndDul, storageDataBackEndDul } from "./formatData"



// 获取 96 点数据
const getTimeArr = createSerialDates(['2020-01-01', '2020-01-01'],96,'YYYY-MM-DD HH:mm')
/**地区code目前写死山东 */
export const areaCode = "370000"


/**根据数据类型调不同的配置去取数据传入到数据转换格式方法里面 */
export const methodConfig = {
  [DataSourceTypeEnum.MARKET_DISCLOSURE_INFORMATION_PRE_CLEARANCE]:{
    dataBase:'warehouse_trading_shandong',
    table:DataBaseTableNameEnum.ODS_TRADING_SD_HUIDIAN_AHEAD_INC,
    areaCode:areaCode,
    timeArr:getTimeArr,
    method:marketDulDisclosureBackEndDul
  },
  [DataSourceTypeEnum.STORAGE_DATA_PRE_CLEARANCE]:{
    dataBase:'warehouse_trading_shandong',
    table:DataBaseTableNameEnum.ODS_TRADING_SD_HUIDIAN_REALTIME_INC,
    areaCode:areaCode,
    timeArr:getTimeArr,
    method:marketDulDisclosureBackEndDul
  },
  [DataSourceTypeEnum.MARKET_DISCLOSURE_INFORMATION_TEMPORARY]:{
    dataBase:'warehouse_trading_shandong',
    table:DataBaseTableNameEnum.ODS_TRADING_SD_HUIDIAN_AHEAD_INC,
    areaCode:areaCode,
    timeArr:getTimeArr,
    method:storageDataBackEndDul
  }
}